package d3_exceptiondeal;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class ExceptionTest3 {
    public static void main(String[] args) {
        try {
            test();
        } catch (FileNotFoundException e) {
            System.out.println("文件不存在");
            throw new RuntimeException(e);
        } catch (ParseException e) {
            System.out.println("时间有问题");
            throw new RuntimeException(e);
        }
    }
    public static void test() throws FileNotFoundException, ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date date = sdf.parse("2028-12-12 12:12");
        System.out.println(date);

        test2();
    }
    public static void test2() throws FileNotFoundException {
        InputStream is = new FileInputStream("D:/das.jpg");
    }
}
